<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Serach</title>
    <style>
        nav {
            width: 100%;
            height: 300px;
        }

        .logo {
            text-align: center;
        }

        .logo img {
            width: 215px;
            height: 110px;
        }

        .search {
            width: 750px;
            height: 50px;
            margin: auto;
            display: flex;
            justify-content: center;
            align-content: center;
            min-width: 750px;
            position: relative;
        }

        input {
            width: 550px;
            height: 40px;
            border-right: none;
            border-bottom-left-radius: 10px;
            border-top-left-radius: 10px;
            border-color: #f5f5f5;
            /* 去除搜索框激活状态的边框 */
            outline: none;
        }

        input:hover {
            /* 鼠标移入状态 */
            box-shadow: 2px 2px 2px #ccc;
        }

        input:focus {
            /* 选中状态,边框颜色变化 */
            border-color: rgb(78, 110, 242);
        }

        .search span {
            position: absolute;
            font-size: 23px;
            top: 10px;
            right: 170px;
        }

        .search span:hover {
            color: rgb(78, 110, 242);
        }

        button {
            width: 100px;
            height: 44px;
            background-color: rgb(78, 110, 242);
            border-bottom-right-radius: 10px;
            border-top-right-radius: 10px;
            border-color: rgb(78, 110, 242);
            color: white;
            font-size: 14px;
        }

        .search_img {
            width: 90px;
            height: 30px;
            text-align: center;
            color: #ccc;
            line-height: 30px;
            border-radius: 5px;
            position: absolute;
            top: 50px;
            right: 135px;
            box-shadow: 0px 0px 3px #ccc;
            border-color: white;
            display: none;
        }

        .photo:hover + .search_img {
            display: block;
        }
    </style>
</head>

<body>
    <nav>
        <div class="logo">
            <a href="www.baidu.com"><img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
                    alt=""></a>
        </div>
        <div class="search">
            <input type="text">
            <span class="layui-icon photo">&#xe660 </span>
            <div class="search_img"><a href="">按图片搜索</a></div>
            <button>百度一下</button>
        </div>
    </nav>
</body>

</html>